package com.wuyan.locationdog.util.imageselecter

import android.content.Context
import android.widget.ImageView
import com.arcsoft.commonbase.ext.glidePauseRequests
import com.arcsoft.commonbase.ext.glideResumeRequests
import com.arcsoft.commonbase.ext.loadImage

import com.luck.picture.lib.engine.ImageEngine

class GlideEngine : ImageEngine {

    override fun loadAlbumCover(context: Context, url: String?, imageView: ImageView) {
        imageView.loadImage(url)
    }

    override fun loadGridImage(context: Context, url: String, imageView: ImageView) {
        imageView.loadImage(url)
    }

    override fun loadImage(context: Context, url: String?, imageView: ImageView) {
        imageView.loadImage(url)
    }

    override fun loadImage(
        context: Context,
        imageView: ImageView,
        url: String?,
        maxWidth: Int,
        maxHeight: Int
    ) {
        imageView.loadImage(url, maxWidth, maxHeight)

    }


    override fun pauseRequests(context: Context) {
        glidePauseRequests(context)
    }

    override fun resumeRequests(context: Context) {
        glideResumeRequests(context)
    }


}